package week12.config;

import com.rabbitmq.tools.json.JSONUtil;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicExchangeConsumer {

    @RabbitListener(queues = "queue1")
    @RabbitHandler
    public void getQueue1Message(String msg) {
        System.out.println("消费了:"+msg);
    }


}